package com.auction.mapper;

import com.auction.entity.ProductCarousel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ProductCarouselMapper extends BaseMapper<ProductCarousel> {
    //根据商品id查询
    List<Map> selectByProductId(Integer productId);
    //批量插入
    int insertCarousel(@Param("product_id") Integer productId, @Param("carouselList") List<ProductCarousel> carouselList);
    //根据产品id删除数据
    int deleteByProductId(@Param("product_id") Integer productId);

    List<Map> selectComm();
}

